const get = (key: string) => {
  const val = localStorage.getItem(key)
  if (val) {
    return JSON.parse(val)
  }
  return ''
}

const set = (key: string, value: any) => {
  localStorage.setItem(key, JSON.stringify(value))
}

export { get, set }
